//
//  UIImageView+HZUnite.m
//  car4S
//
//  Created by huazi on 14-6-18.
//  Copyright (c) 2014年 huifu. All rights reserved.
//

//#import "UIImageView+HZUnite.h"
//#import "UIImageView+WebCache.h"
//@implementation UIImageView (HZUnite)
//+(UIImageView *)returnUniteWithArrayPicUrls:(NSArray *)arrays  AndSuperView:(UIImageView *)returnImageView
//{
//    for (UIView *subview in returnImageView.subviews)
//    {
//        [subview removeFromSuperview];
//    }
//    
//    float height =returnImageView.frame.size.height;
//    float width =returnImageView.frame.size.width;
//    
//    if ([arrays count]==1 ||[arrays count]>4)
//    {
//        if ([arrays count]==1)
//        {
//            if ([[arrays objectAtIndex:0] isEqualToString:@""])
//            {
//                returnImageView.image = [UIImage imageNamed:@"default_icon1"];
//            }
//            else {
//                [returnImageView setImageWithURL:[NSURL URLWithString:arrays[0]] placeholderImage:[UIImage imageNamed:@"default_icon1"]];
//            }
//        }
//        
//    }
//    
//    else
//    {
//    for (int i=0;i<[arrays count] ; i++)
//    {
//        if (i==0)
//        {
//            UIImageView *image1 =[[UIImageView alloc] initWithFrame:CGRectMake(5, 5, (width-15)/2, (height-15)/2)];
//            [image1 setImageWithURL:[NSURL URLWithString:arrays[i]] placeholderImage:[UIImage imageNamed:@"default_icon1"]];
//            [returnImageView addSubview:image1];
//        }
//        else if (i==1)
//        {
//            UIImageView *image2 =[[UIImageView alloc] initWithFrame:CGRectMake((width-15)/2+10, 5, (width-15)/2, (height-15)/2)];
//            [image2 setImageWithURL:[NSURL URLWithString:arrays[i]] placeholderImage:[UIImage imageNamed:@"default_icon1"]];
//            [returnImageView addSubview:image2];
//        }
//        else if (i==2)
//        {
//            UIImageView *image2 =[[UIImageView alloc] initWithFrame:CGRectMake(5, (height-15)/2+10, (width-15)/2, (height-15)/2)];
//            [image2 setImageWithURL:[NSURL URLWithString:arrays[i]] placeholderImage:[UIImage imageNamed:@"default_icon1"]];
//            [returnImageView addSubview:image2];
//        }
//        else
//        {
//            UIImageView *image2 =[[UIImageView alloc] initWithFrame:CGRectMake((width-15)/2+10, (height-15)/2+10, (width-15)/2, (height-15)/2)];
//            [image2 setImageWithURL:[NSURL URLWithString:arrays[i]] placeholderImage:[UIImage imageNamed:@"default_icon1"]];
//            [returnImageView addSubview:image2];
//            
//        }
//    }
//    }
//    return returnImageView;
//}
//
//@end
